﻿@model SampleApp.Web.SysModule.Models.UserRoleListModel
@{
    Layout = null;
}

<div id="divList">
  <form id="userRoleListForm">
    @Html.HiddenFor(m=>m.UserCode)
    <table>
        <tr>
            <th style="width:40px;text-align:left;">
                选择
            </th>
            <th style="width:80px;text-align:left;">
                角色
            </th>
            <th style="display:none;">
                ID
            </th>
        </tr>

       @for (var i = 0; i < Model.RoleList.Count; i++)
        {
            <tr>
                <td style="width:40px;text-align:left;">
                    @Html.CheckBoxFor(m => m.RoleList[i].IsSelected)
                </td>
                <td style="width:80px;text-align:left;">
                    @Html.DisplayFor(m => m.RoleList[i].RoleName)
                </td>
                 <td style="display:none;">
                    @Html.HiddenFor(m => m.RoleList[i].RoleID)
                </td>
            </tr>
        }

    </table>
   </form>
</div>
